package com.acwing.partition17;

import java.io.*;
import java.util.Arrays;

/**
 * @author `RKC`
 * @date 2022/2/10 23:38
 */
public class AC1684大型植被恢复 {

    private static final int N = 110, M = 310;
    private static int[] head = new int[N], ver = new int[M], next = new int[M];
    private static boolean[][] st = new boolean[N][5];

    private static int n = 0, m = 0, idx = 0;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        String[] ss = reader.readLine().split(" ");
        n = Integer.parseInt(ss[0]);
        m = Integer.parseInt(ss[1]);
        Arrays.fill(head, -1);
        for (int i = 0; i < m; i++) {
            ss = reader.readLine().split(" ");
            int a = Integer.parseInt(ss[0]), b = Integer.parseInt(ss[1]);
            add(a, b);
            add(b, a);
        }
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= 4; j++) {
                if (!st[i][j]) {
                    writer.write(j + "");
                    for (int k = head[i]; k != -1; k = next[k]) {
                        int v = ver[k];
                        //i种植了j草，v就不能种植j草
                        st[v][j] = true;
                    }
                    break;
                }
            }
        }
        writer.flush();
    }

    private static void add(int a, int b) {
        ver[idx] = b;
        next[idx] = head[a];
        head[a] = idx++;
    }
}
